Skip to content

Disable distribution of intersection types over applied types #23441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

EugeneFlesselle
Copy link
Contributor

@EugeneFlesselle EugeneFlesselle commented Jun 27, 2025

Fixes soundness issue #23435

Note in particular that this implies we cannot (indirectly) inherit multiple instantiations of the same trait. E.g., see tests/neg/conflicting-inst-basetypes.scala.

The impact on the community-build appears to be rather reasonable, tweaks are required:

@EugeneFlesselle EugeneFlesselle force-pushed the distributeAnd branch 3 times, most recently from e7b35cc to 2daa02b Compare July 16, 2025 15:29
@EugeneFlesselle EugeneFlesselle marked this pull request as ready for review July 17, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsoundness with distribution of intersection over covariant types
1 participant